package A1_4_Shopsystem;

import java.util.Date;

// 信用卡支付
public class Credit extends Payment {
    private String number;
    private String type;
    private Date expireDate;

    public Credit(double amount, Order order, String number, String type, Date expireDate) {
        super(amount, order);
        this.number = number;
        this.type = type;
        this.expireDate = expireDate;
    }

    @Override
    public boolean processPayment() {
        // 模拟信用卡支付处理逻辑
        System.out.println("Processing credit card payment for order: " + getOrder());
        // 实际实现中会有银行接口调用等
        return true;
    }

    // Getter 方法
    public String getNumber() {
        return number;
    }

    public String getType() {
        return type;
    }

    public Date getExpireDate() {
        return expireDate;
    }
}
